import { Meta } from '@storybook/blocks';

import * as RefreshIndicatorStories from '../stories/RefreshIndicator.stories';

<Meta of={RefreshIndicatorStories} />

# RefreshIndicator

A widget that supports the Material "swipe to refresh" idiom.

## Example

```dart liveslice=RefreshIndicator mockup=iPhone7
Scaffold(
  appBar: AppBar(
    title: Text('RefreshIndicator Sample'),
  ),
  body: RefreshIndicator(
    onRefresh: () async {
      return await Future.delayed(Duration(seconds: 3));
    },
    child: ListView(
      padding: const EdgeInsets.all(8.0),
      children: <Widget>[
        Container(
          height: 50,
          color: Colors.amber[600],
          child: const Center(child: Text('Entry A')),
        ),
        Container(
          height: 50,
          color: Colors.amber[500],
          child: const Center(child: Text('Entry B')),
        ),
        Container(
          height: 50,
          color: Colors.amber[100],
          child: const Center(child: Text('Entry C')),
        ),
      ],
    ),
  ),
)
```

## Related Links

- https://api.flutter.dev/flutter/material/RefreshIndicator-class.html
